package my.test;

import com.sdgakj.utils.CouponConstants;
import org.apache.commons.lang.StringUtils;
import org.joda.time.LocalDate;

/**
 * @author limengyang 2016/12/28
 */
public class AA {

    public static void main(String[] args) {

        //System.out.println(oneGTTwo("2.4.4","2.5.0"));
        LocalDate localDate = new LocalDate();
        String date = localDate.plusDays(CouponConstants.REMIND_AFTER_DAYS).toString("yyyy-MM-dd");
        System.out.println(date);
    }

    public static boolean  oneGTTwo(String version1,String version2) {
        int[] one = new int[3];
        int[] two = new int[3];
        String[] oneArr = StringUtils.split(version1,'.');
        String[] twoArr = StringUtils.split(version2,'.');
        for (int i = 0; i < oneArr.length; i++) {
            one[i] = Integer.parseInt(oneArr[i]);
        }
        for (int i = 0; i< twoArr.length; i++) {
            two[i] = Integer.parseInt(twoArr[i]);
        }

        if (one[0] == two[0] && one[1] == two[1] && one[2] == two[2]) {
            return true;
        }

        if (one[0] > two[0] )
            return true;
        else if (one[0] < two[0])
            return false;

        if (one[1] > two[1] )
            return true;
        else if (one[1] < two[1])
            return false;

        if (one[2] > two[2] )
            return true;
        else if (one[2] < two[2])
            return false;


        return false;
    }

}
